package com.york.tinyrpc.protoss.fault.retry;

import com.york.tinyrpc.protoss.model.TinyRpcResponse;

import java.util.concurrent.Callable;


/**
 * 重试策略
 */
public interface RetryStrategy {

    /**
     * 执行重试
     *
     * @param target 目标任务
     * @return TinyRpcResponse
     * @throws Exception
     */
    TinyRpcResponse doRetry(Callable<TinyRpcResponse> target) throws Exception;
}
